<template>
	<view class="content">
		<image class="logo" src="/static/logo.jpg"></image>
		<view class="text-area">
			<text class="title">{{title}}</text>
		</view>
		<button class="navigate-btn" @click="goToSecondPage">进入二级页面</button>
		<custom-tab-bar></custom-tab-bar>
	</view>
</template>

<script>
	import CustomTabBar from '@/components/CustomTabBar.vue'
	
	export default {
		components: {
			CustomTabBar
		},
		data() {
			return {
				title: '抖音：编程两年半'
			}
		},
		onShow() {
			uni.hideTabBar()
			// 发送事件更新自定义 tabbar 的状态
			uni.$emit('updateTabBar')
		},
		onLoad() {
			
		},
		methods: {
			goToSecondPage() {
				uni.navigateTo({
					url: '/pages/second/second'
				})
			}
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
		border-radius: 20rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
	
	.navigate-btn {
		margin-top: 50px;
		background-color: #1296db;
		color: #ffffff;
		border-radius: 25px;
		width: 80%;
		height: 45px;
		line-height: 45px;
		font-size: 16px;
	}
</style>
